This forum is closed to new posts and
responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:
~Naomi Elnupuljip 7.Oct.03 05:42 PM a Web browser Applications Development6.0.3; 6.0.2 CF2; 6.0.2 CF1; 6.0.2; 6.0.1 CF3; 6.0.1 CF2; 6.0.1 CF1; 6.0.1; 6.0Windows XP
I want to do some additional tasks which I want to do in LotusScript.
Here is my current script:
Sub Click(Source As Button)
Dim ss As New NotesSession
Dim ws As New NotesUIWorkspace
Dim UIView As NotesUIView
Dim db As NotesDatabase
Dim View As NotesView
Dim dc As NotesDocumentCollection
Dim dc2 As NotesDocumentCollection
Dim Doc As NotesDocument
Dim DelDoc As NotesDocument
Dim Agent As NotesAgent
Set db = ss.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set Doc = dc.GetFirstDocument
Set View = db.GetView("DeletedChildDocs")
Do While Not Doc Is Nothing
If Doc.TaskSubform(0) = "1" Then
Set dc2 = View.GetAllDocumentsByKey(Doc.UniversalID)
Call dc2.StampAll("Deleted", "")
End If
Set DelDoc = Doc
Set Doc = dc.GetNextDocument(Doc)
Loop
Set UIView = ws.CurrentView
Set Doc = dc.GetFirstDocument
Do While Not Doc Is Nothing
Call UIView.SelectDocument(Doc)
Set Doc = dc.GetNextDocument(Doc)
Loop
' Evaluate {@Command([EditRestoreDocument]);}
' Evaluate {@Command([ToolsRunMacro]; "RestoreDocuments")}
Set Agent = db.GetAgent("RestoreDocuments")
Call Agent.Run
End Sub
The RestoreDocuments agent contains a
@Command([EditRestoreDocument]);
and works well by itself.
To rephrase the question: how do you make LS to run this agent? It does not even start, but fails silently...
I put the second Do/Loop in as part of the struggle but did not help.
Can you?
Thanks!